package com.ruoyi.common.enums.wechat;

import java.util.Arrays;

/**
 * @author jiexiang.sun/Jason
 * @create 2022-03-13 14:57
 **/
public enum WechatRectificationStatusEnum {
    NOT_PROCESSED((short) 0, "未处理", "问题未处理"),
    PROCESSED((short) 1, "已处理", "问题已经被地方处理"),
    PROCESSING_COMPLETE((short) 2, "处理完成", "问题已经完成"),
    PUBLISH_COUNTY((short) 3, "已下发工单", "工单下发到区县级"),
    PUBLISH_STREET((short) 4, "已下发工单", "工单下发到地方街道级"),
    HANDLING_RETURN_COUNTY((short) 5, "退回", "问题退回到区县"),
    HANDLING_RETURN_STREET((short) 6, "退回", "问题退回到地方街道");

    private short status;
    private String text;
    private String desc;

    WechatRectificationStatusEnum(short status, String text, String desc) {
        this.status = status;
        this.text = text;
        this.desc = desc;
    }

    public static WechatRectificationStatusEnum getByStatus(short status) {
        return Arrays.stream(values()).filter(v -> v.status == status).findFirst().get();
    }

    public short getStatus() {
        return status;
    }

    public void setStatus(short status) {
        this.status = status;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }
}
